//
//  AppConfig.swift
//  JJToolSwift
//
//  Created by heihei on 2024/5/9.
//

import Foundation

public typealias VoidBlock = () -> Void
public typealias BoolBlock = (Bool) -> Void
public typealias IntBlock = (Int) -> Void
public typealias DoubleBlock = (Double) -> Void
public typealias StringBlock = (String) -> Void
public typealias AnyBlock = (Any) -> Void

/// app相关配置
public struct AppConfig {
    /// 应用ID，com开头的那个
    public static let bundleId = Bundle.main.infoDictionary?["CFBundleIdentifier"] as? String ?? "Unknown"
    /// app版本号 eg:1.0.0
    public static let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0"
    /// app构建版本号 eg:1
    public static let buildNumber = Int(Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "0") ?? 0
    /// app名字
    public static let appName = Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String ?? "Unknown"
}
